const OPTION = {
    backgroundColor: '#021033',
    title: {
        text: '监控节点实时状态',
        left: 'center',
    },
    tooltip: {},
    geo: {
        map: '',
        roam: false,    // 放大缩小及拖动，由监听事件联动
        aspectScale: 1,     // scale 地图的长宽比，默认 0.75
    },
    legend: [
        {
            type: 'scroll',
            top: 10,
            left: 10,
            orient: 'vertical',
            itemGap: 16,
            pageIconColor: '#eef1fa',
            pageIconInactiveColor: '#333',
            pageTextStyle: {
                color: '#eef1fa'
            },
            animationDurationUpdate: 300,
            selector: [
                {
                    type: 'all',
                    title: '全选'
                },
                {
                    type: 'inverse',
                    title: '反选'
                }
            ],
            selectorLabel: {
                color: 'inherit',
                borderRadius: 4,
                padding: 5
            },
            selectorItemGap: 5,
            selectorButtonGap: 10,
            data: [],
        },
    ],
    animationDuration: 300,
    animationEasingUpdate: 'quarticOut',
    series: [
        {   // 节点图层
            name: 'statusGraph',
            type: 'graph',
            layout: 'none',
            data: [],
            links: [],
            categories: [],
            roam: true,
            label: {
                show: true,
                position: 'right',
                formatter: '{b}',
            },
            lineStyle: {
                color: 'source',
                width: 3,
                curveness: 0.2,
            },
            emphasis: {
                scale: true,    // 开启高亮后节点的放大效果
                focus: 'adjacency',     // 聚焦关系图中的邻接点和边的图形
                blurScope: 'coordinateSystem',   // 淡出范围为坐标系
                lineStyle: {
                    width: 8
                }
            }
        },
        {   // 特效图层
            type: 'lines',
            coordinateSystem: 'geo',
            effect: {
                show: true,     // 显示线特效
                period: 2,      // 特效动画时间
                symbol: 'circle',   // 特效图形
                symbolSize: 3,
                trailLength: 0.3    // 特效尾迹的长度, 0 到 1 的值
            },
            symbol: ['circle', 'circle'],     // 线两端的标记
            symbolSize: 0,
            lineStyle: {
                width: 0,
                opacity: 0,     // 隐藏线
                curveness: -0.2     // 与节点图层曲度保持一致
            },
            // label: {    // 节点图层无法实现的，可以用特效图层显示线的信息，曲线救国
            //     show: true,
            //     position: 'middle'
            // },
            data: [
                {
                    coords: [
                        [],     // 起点
                        []      // 终点
                    ]
                },
            ],
            zlevel: -1,
            animation: false
        }
    ],
};

export default OPTION;